<?php
include '../function.php';
$pro = new Product();
$user = new User();
$shop = new Shop();

if($_POST['request'] == 'check_login'){
	if($user->checkLogin()){echo 'true';exit();}
	echo 'false';
}

if($_POST['request'] == "cart"){
	if($_POST['ac'] == 'add'){
		if($shop->addCart($_POST['goods'],$_POST['num'])){echo 'true';exit();}
	}else if($_POST['ac'] == 'del'){
		if($shop->delCart($_POST['cart'])){echo 'true';exit();}
	}
	echo 'false';
}
?>